From: Luwei Kang Date: Tue, 13 Dec 2016 13:21:26 +0000 (+0100) Subject: x86/VPMU: clear the overflow status of which counter happened to overflow X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3164 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:///%22http:/www.example.com/cgi/%22https:/?a=commitdiff_plain;h=7a0c70482580234868fcc53b8d72e31966dc7c52;p=xen.git x86/VPMU: clear the overflow status of which counter happened to overflow Just set the corresponding bits of counters which happened to overflow, rather than setting all the available bits of IA32_PERF_GLOBAL_OVF_CTRL when pmu interrupt happened. Signed-off-by: Luwei Kang Acked-by: Kevin Tian Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c index e51bc4e61f..16e5afb3a7 100644 --- a/xen/arch/x86/cpu/vpmu_intel.c +++ b/xen/arch/x86/cpu/vpmu_intel.c @@ -837,7 +837,7 @@ static int core2_vpmu_do_interrupt(struct cpu_user_regs *regs) if ( is_pmc_quirk ) handle_pmc_quirk(msr_content); core2_vpmu_cxt->global_status |= msr_content; - msr_content = ~global_ovf_ctrl_mask; + msr_content &= ~global_ovf_ctrl_mask; wrmsrl(MSR_CORE_PERF_GLOBAL_OVF_CTRL, msr_content); } else